#pragma once
#include "amqp.h"
#include <string>

namespace amqp {
    enum class delivery_mode_t { dm_nonpersistent = 1, dm_persistent = 2 };

    class Property {
      public:
        Property();
        Property(const amqp_basic_properties_t &prop);

        ~Property();
        Property& operator = (Property& src);

      public:
        std::string ContentType() const;
        void ContentType(const std::string& content_type);

        std::string ContentEncoding() const;
        void ContentEncoding(const std::string& content_encoding);

        delivery_mode_t DeliveryMode() const;
        void DeliveryMode(delivery_mode_t delivery_mode);

        uint8_t Priority() const;
        void Priority(uint8_t priority);

        std::string CorrelationId() const;
        void CorrelationId(const std::string& correlation_id);

        std::string ReplyTo() const;
        void ReplyTo(const std::string& reply_to);

        std::string Expiration() const;
        void Expiration(const std::string& expiration);

        std::string MessageId() const;
        void MessageId(const std::string& message_id);

        uint64_t Timestamp() const;
        void Timestamp(uint64_t timestamp);

        std::string Type() const;
        void Type(const std::string& type);

        std::string UserId() const;
        void UserId(const std::string& user_id);

        std::string AppId() const;
        void AppId(const std::string& app_id);

        std::string ClusterId() const;
        void ClusterId(const std::string& cluster_id);

      public:
        const amqp_basic_properties_t* getProperties()const;
        void CopyFrom(const amqp_basic_properties_t* prop);

      private:
        amqp_basic_properties_t m_prop;
        amqp_pool_t             m_pool;
    };
}